#!/usr/bin/env python
# encoding: utf-8

VERSION="0.1"

top = "."

arduino = 'src/arduino/'

def options(opt):
    opt.load('compiler_c')

def configure(cfg):
    cfg.load('compiler_c')
    cfg.check(features='c cprogram', 
              cflags=['-Wall', '-v', '-fexceptions', '-g'],)

    print 'Creating directory "data"', ": ",
    cfg.path.make_node('data').mkdir()
    print 'done'
        
    print 'Creating directory "fig"', ": ",
    cfg.path.make_node('fig').mkdir()
    print 'done'
        
def build(bld):
    bld(features='c cprogram', 
        source=[arduino + 'arduino.c',
                arduino + 'serial.c'], 
        target='dray-arduino', 
        cflags=['-Wall', '-fexceptions'],
        use=[], lib=['m'])


def dist(ctx):
    ctx.excl  = "**/.waf-1* **/*~ **/*.pyc **/*.swp **/.lock-w* build"
